<?php
/**
 *  
 *  @author  wangzhoudong  <admin@zhen.pl>
 *  @version    1.0
 *
 */
Yii::app ()->clientScript->registerCssFile ( "/static/css/core.css");
Yii::app ()->clientScript->registerScriptFile ( "/static/js/core.js", CClientScript::POS_END );
Yii::app ()->clientScript->registerScriptFile ( "/static/js/dialog.js", CClientScript::POS_END );
Yii::app ()->clientScript->registerScriptFile ( "/static/js/area/div.js", CClientScript::POS_END );
Yii::app ()->clientScript->registerScriptFile ( "/static/js/dict/area.js", CClientScript::POS_END );
$funcStr = '';
if($func) {
	$funcStr = "$func(obj)";
}
Yii::app()->clientScript->registerScript('area_div#' . $id,"$('#$jqueryId-btn').pLocationDialog({
		fnOnChoose: function(obj){
			$('#$jqueryId').val(obj.id);
			$('#$jqueryId-btn').val(obj.name).attr('title', obj.name);
			$funcStr
		}});")
;

if (isset ( $data ['name'] )) {
	$button = $data ['name'];
} else {
	$button = '选择地区';
}
?>

<input id="<?php echo $id?>-btn" type="button" value="<?php echo $button?>"  class="component_btn component_btn_area" />
	
<input type="hidden" id="<?php echo $id?>" name="<?php echo $name?>" value="<?php echo isset($data['area_id']) ? $data['area_id'] : '';?>" />


